package com.aizhixin.lab.project.course.repository;

import com.aizhixin.lab.project.course.entity.ExercisesStuAnswer;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ExercisesStuAnswerRepository extends JpaRepository<ExercisesStuAnswer,String> {
    List<ExercisesStuAnswer> findByGroupTaskIdAndStuId(String groupId,Long stuId);
    List<ExercisesStuAnswer> findByGroupTaskIdAndStuIdAndIsCorrect(String groupId,Long stuId,Integer isCorrect);
    ExercisesStuAnswer findByGroupTaskIdAndStuIdAndExercisesId(String groupIdTaskId,Long stuId,String exercisesId);
    Integer deleteByGroupTaskIdAndStuId(String groupIdTaskId,Long stuId);
}
